package ooExercise.ooday02;

public class Animal {
    String name;
    String color;
    int age;
    String food;


     Animal(String name, String color, int age, String food) {
        this.name = name;
        this.color = color;
        this.age = age;
        this.food = food;
    }


    void run(){
        System.out.println("一只"+age+"岁的,名叫"+name+"正在操场");
    }
    void drink(){
        System.out.println(color+"颜色的,"+age+"岁的，名叫"+name+"正在喝水");
    }
    void eat(){
        System.out.println(color+"颜色的,"+age+"岁的，名叫"+name+"正在吃"+food);
    }

}
